﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Way.Lib;

namespace CheckIn
{
    public class ServiceException : Exception
    {
        public int ErrorCode { get; init; }

        public ServiceException(string msg) : base(new { code = 0, msg = msg }.ToJsonString())
        {

        }


        public ServiceException(int errorCode, string msg) : base(new { code = errorCode, msg = msg }.ToJsonString())
        {
            this.ErrorCode = errorCode;
        }

    }
}
